import request from '@/utils/request'

// 查询装备商品列表
export function listGuns(query) {
  return request({
    url: '/admin/guns/list',
    method: 'get',
    params: query
  })
}

// 查询装备商品详细
export function getGuns(id) {
  return request({
    url: '/admin/guns/' + id,
    method: 'get'
  })
}

// 新增装备商品
export function addGuns(data) {
  return request({
    url: '/admin/guns',
    method: 'post',
    data: data
  })
}

// 修改装备商品
export function updateGuns(data) {
  return request({
    url: '/admin/guns',
    method: 'put',
    data: data
  })
}

// 删除装备商品
export function delGuns(id) {
  return request({
    url: '/admin/guns/' + id,
    method: 'delete'
  })
}

// 导出装备商品
export function exportGuns(query) {
  return request({
    url: '/admin/guns/export',
    method: 'get',
    params: query
  })
}
